Skip to content

fix(test): wait for rendered frames instead of wall-clock delays before GPU readbacks - #524

Merged
Codeboy-cn merged 1 commit into
Orillusion:devfrom
Codeboy-cn:fix/ci-frame-waits
Nov 5, 2026
Merged

Codeboy-cn merged 1 commit into
Orillusion:devfrom
Codeboy-cn:fix/ci-frame-waits

Conversation

@Codeboy-cn

Copy link
Copy Markdown
Collaborator

CI runs WebGPU on SwiftShader at ~2 fps or slower, so a 300-500 ms delay after changing a setting often covers no frame at all and the readback sees the previous image (Material_Sheen failed this way on CI). Add a shared frames(n) helper to test/util.ts and use it in the Sheen, Iridescence, Tonemap, Lens and Water tests wherever an assertion depends on a new frame. Lens now also waits a frame between the two grainStatic reads so they really compare two frames.

…re GPU readbacks

CI runs WebGPU on SwiftShader at ~2 fps or slower, so a 300-500 ms delay after
changing a setting often covers no frame at all and the readback sees the
previous image (Material_Sheen failed this way on CI). Add a shared
`frames(n)` helper to test/util.ts and use it in the Sheen, Iridescence,
Anisotropy, Tonemap, Lens and Water tests wherever an assertion depends on a new frame.
Lens now also waits a frame between the two grainStatic reads so they really
compare two frames.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Codeboy-cn
Codeboy-cn merged commit f90b4d5 into Orillusion:dev Nov 5, 2026
1 check passed
@lslzl3000 lslzl3000 mentioned this pull request Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant